{include file="common/header"}
<style>.edition{margin-left:10px;float:right;border:none; background:red;color:white;border-radius:6px;border-top-right-radius:0px;border-bottom-right-radius:0px;height:39px;font-size:13px;}.eimg{width:55px;border-radius:6px;border-top-left-radius:0px;border-bottom-left-radius:0px;float:right;}.edetail{margin-left:10px;float:right;border:none; background:orange;color:white;border-radius:6px;height:39px;font-size:13px;}.layui-layer{background:white;border:none;border-radius:6px;overflow-y:auto}.layui-layer-title{background:#f8f8f8;} a:visited { color: #660000;}a:hover {	color: #0000FF;}</style>
<main class="lyear-layout-content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-4">
                <div class="card bg-cyan" id="wsStatus">
                    <div class="card-body clearfix">

                        <div class="pull-right">
                            <p class="h6 text-white m-t-0">连接状态</p>
                            <p class="h3 text-white m-b-0 statusText">读取中...</p>
                        </div>
                        <div class="pull-right" style="margin-right:20px;">
                            <p class="h6 text-white m-t-0">
                                <a href="javascript:openFailsDialog()">查看连接教程 </a>
                            </p>
                        </div>
                        <div class="pull-left">
                            <span class="img-avatar img-avatar-48 bg-translucent">
                                <i class="iconfont icon-shezhi1 fa-1-5x"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="col-lg-8">
                <div class="card bg-brown">
                    <div class="card-body clearfix">
                        <div class="pull-right" >
                            <p class="h6 text-white m-t-0">{:lang('index.ws_address')}</p>
                            <p class="h5 text-white m-b-0">{:config('im.WS_address')}</p>
                            <p class="h5 text-white m-b-0"><a href="{:adminUrl('admin/gateway/index')}">去修改</a></p>
                        </div>
                        <div class="pull-right" style="margin-right:40px">
                            <p class="h6 text-white m-t-0">{:lang('index.register_ip')}</p>
                            <p class="h5 text-white m-b-0">{:config('im.Register_ip')}:{:config('im.Register_port')}</p>
                            <p class="h5 text-white m-b-0">{:config('im.WS_intranet')}:{:config('im.WS_port')}</p>
                        </div>
                        <div class="pull-left">
                            <span class="img-avatar img-avatar-48 bg-translucent">
                                <i class="iconfont icon-mobanguanli fa-1-5x"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-2">
                <div class="card bg-primary">
                    <div class="card-body clearfix">
                        <div class="pull-right">
                            <p class="h6 text-white m-t-0">{:lang('index.stat_zxhy')}</p>
                            <p class="h3 text-white m-b-0">{$im_stat_zxhy}</p>
                        </div>
                        <div class="pull-left">
                            <span class="img-avatar img-avatar-48 bg-translucent">
                                <i class="iconfont icon-03 fa-1-5x"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-2">
                <div class="card bg-danger">
                    <div class="card-body clearfix">
                        <div class="pull-right">
                            <p class="h6 text-white m-t-0">{:lang('index.stat_wjd')}</p>
                            <p class="h3 text-white m-b-0">{:stat_wjd()}</p>
                        </div>
                        <div class="pull-left">
                            <span class="img-avatar img-avatar-48 bg-translucent">
                                <i class="iconfont icon-weijihuohuiyuan fa-1-5x"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-2">
                <div class="card bg-success">
                    <div class="card-body clearfix">
                        <div class="pull-right">
                            <p class="h6 text-white m-t-0">{:lang('index.stat_jrlt')}</p>
                            <p class="h3 text-white m-b-0">{$im_stat_jrlt}</p>
                        </div>
                        <div class="pull-left">
                            <span class="img-avatar img-avatar-48 bg-translucent">
                                <i class="iconfont icon-huifu fa-1-5x"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-2">
                <div class="card bg-purple">
                    <div class="card-body clearfix">
                        <div class="pull-right">
                            <p class="h6 text-white m-t-0">{:lang('index.stat_jrpj')}</p>
                            <p class="h3 text-white m-b-0">{$im_stat_jrpj}</p>
                        </div>
                        <div class="pull-left">
                            <span class="img-avatar img-avatar-48 bg-translucent">
                                <i class="iconfont icon-pinglun3 fa-1-5x"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-2">
                <div class="card bg-primary">
                    <div class="card-body clearfix">
                        <div class="pull-right">
                            <p class="h6 text-white m-t-0">{:lang('index.stat_ltxx')}</p>
                            <p class="h3 text-white m-b-0">{$im_stat_ltxx}</p>
                        </div>
                        <div class="pull-left">
                            <span class="img-avatar img-avatar-48 bg-translucent">
                                <i class="iconfont icon-iconfontxiaoxi fa-1-5x"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-lg-2">
                <div class="card bg-danger">
                    <div class="card-body clearfix">
                        <div class="pull-right">
                            <p class="h6 text-white m-t-0">{:lang('index.stat_zpj')}</p>
                            <p class="h3 text-white m-b-0">{$im_stat_zpj}</p>
                        </div>
                        <div class="pull-left">
                            <span class="img-avatar img-avatar-48 bg-translucent">
                                <i class="iconfont icon-liaotian fa-1-5x"></i>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-lg-12">{$auth_url|raw}</div>
        </div>
        <div class="row">
            <div class="col-lg-6">
                <div class="card">
                    <div class="card-header">
                        <h4>{:lang('index.web_information')}</h4>
                    </div>
                    <div class="card-body">
                        <dl class="row web_information">
                            <dt class="col-sm-3">{:lang('index.version')}</dt>
                            <dd class="col-sm-9">{:config('website.version')}</dd>
                            <dt class="col-sm-3">{:lang('index.upgrade')}</dt>
                            <dd class="col-sm-9">{$grade}{$up|raw}</dd>
                            <dt class="col-sm-3">著作权</dt>
                            <dd class="col-sm-9">2021SR0201207</dd>
                            <dt class="col-sm-3">{:lang('index.official_website')}</dt>
                            <dd class="col-sm-9"><a href="{:config('website.official_url')}" target="_blank">{:config('website.official_url')}</a></dd>
                            <dt class="col-sm-3">{:lang('index.jiaoliuqun')}</dt>
                            <dd class="col-sm-9"><a target="_blank" href="https://qm.qq.com/cgi-bin/qm/qr?k=m0HSLiX5pgCLO0SK7OY99verrAtdUW1W&jump_from=webapi"><img border="0" src="//pub.idqqimg.com/wpa/images/group.png" alt="酷站PHP客服交流群" title="酷站PHP客服交流群"></a>  {:lang('index.qunhao')}</dd>
                           
                            <dt class="col-sm-3">{:lang('index.announcement')}</dt>
                            <dd class="col-sm-9">{$notice}</dd>
                            
                            <dt class="col-sm-3"></dt>
                            <dd class="col-sm-9"></dd>
                            <dt class="col-sm-3"></dt>
                            <dd class="col-sm-9"></dd>
                            <div align="center"><a href="https://www.69kz.com/vdetail.html?cid=54" target="_blank">{:lang('index.course01')}</a> | 
                                                <a href="https://www.69kz.com/vdetail.html?cid=55" target="_blank">{:lang('index.course02')}</a> | 
                                                <a href="https://www.69kz.com/vdetail.html?cid=63" target="_blank">{:lang('index.course03')}</a> | 
                                                <a href="https://www.69kz.com/vdetail.html?cid=62" target="_blank">{:lang('index.course04')}</a> | 
                                                <a href="https://www.69kz.com/vdetail.html?cid=56" target="_blank">{:lang('index.course05')}</a> | 
                                                <a href="https://www.69kz.com/video.html" target="_blank">{:lang('index.course06')}</a> 
                            </div>
                        </dl>
                    </div>
                </div>
            </div>

            <div class="col-lg-6">
                <div class="card">
                    <div class="card-header">
                        <h4>{:lang('index.gateway')}</h4>
                    </div>
                    <div class="card-body">
                        <dl class="row web_information">
                            <dt class="col-sm-3">{:lang('index.ws_port')}</dt>
                            <dd class="col-sm-9">{:config('im.WS_port')}</dd>
                            <dt class="col-sm-3">{:lang('index.ws_address')}</dt>
                            <dd class="col-sm-9">{:config('im.WS_address')}</dd>
                            <dt class="col-sm-3">{:lang('index.ws_intranet')}</dt>
                            <dd class="col-sm-9">{:config('im.WS_intranet')}</dd>
                            <dt class="col-sm-3">{:lang('index.register_ip')}</dt>
                            <dd class="col-sm-9">{:config('im.Register_ip')}</dd>
                            <dt class="col-sm-3">{:lang('index.register_port')}</dt>
                            <dd class="col-sm-9">{:config('im.Register_port')}</dd>
                            <dt class="col-sm-3">脚本执行时间</dt>
                            <dd class="col-sm-9">{:ini_get('max_execution_time')}秒</dd>
                            <dt class="col-sm-3">运行环境</dt>
                            <dd class="col-sm-9">{$_SERVER['SERVER_SOFTWARE']}</dd>
                            <dt class="col-sm-3">POST上传限制</dt>
                            <dd class="col-sm-9">{:ini_get('post_max_size')}B</dd>
                            <dt class="col-sm-3">php上传限制</dt>
                            <dd class="col-sm-9">{:ini_get('upload_max_filesize')}B</dd>
                        </dl>
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>
{include file="common/footer"}
<script>
    var connectHelpUrl = 'https://www.69kz.com/hdetail.html?cid=24';

    function upgrade(){
        var confirm = layer.confirm('系统升级时<span style="color:red">不要操作页面</span>！<br><br>默认从当前版本<span style="color:red">依次升级到最新版本</span>！<br><br>如遇升级问题，系统默认还原到问题版本的<span style="color:red">上个正常版本</span>！', {
            btn: ['升级','取消'],
            title: '阅读以下内容，如有问题请联系官方人员',
        }, function(){
            var edition = "<?php echo config('website.version');?>";
            var layer_load;
            $.ajax({
                url:'upup',
                method: 'post',
                data: {edition:edition},
                dataType: 'json',
                cache: false,
                async: false,
                beforeSend:function() {
                    layer_load = layer.load(2, {shade: [0.3,'#000'], time: 500});
                    $('.edition').html('系统升级中...');
                },
                success: function(res) {
                    we_im_msg(res.data);
                    $('.edition').html(res.data);
                    if(res.code == 200){
                        setTimeout(function() {
                            window.location.reload();
                            layer.close(layer_load);
                        },2000);
                    }else{
                        setTimeout(function() {
                            window.location.reload();
                            $('.edition').html('升级新版本');
                        },2000);
                    }
                }
            });
        });
    }
    function newd(){
        layer.open({
          type: 1,
          title: '版本详情',
          skin: 'layui-layer-rim', //加上边框
          area: ['420px', '400px'], //宽高
          content: '<?php echo $detail;?>'
        });
    }

</script>